#include <iostream>
#include <vector>
#include <sstream>
#include <queue>
#include <algorithm>

int main()
{
    std::vector<int> arr1;
    std::vector<int> arr2;

    std::string in_str;
    std::getline(std::cin, in_str);
    std::istringstream iss1(in_str);
    int num1;
    iss1 >> num1;
    int tmp;
    while (iss1 >> tmp)
    {
        arr1.push_back(tmp);
    }
    // std::cout << num1 << std::endl;

    std::getline(std::cin, in_str);
    std::istringstream iss2(in_str);
    int num2;
    iss2 >> num2;
    while (iss2 >> tmp)
    {
        arr2.push_back(tmp);
    }
    // std::cout << num2 << std::endl;

    int k;
    std::cin >> k;

    // std::vector<int> sum_vec;
    // for (int i = 0; i < num1; i++)
    // {
    //     for (int j = 0; j < num2; j++)
    //     {
    //         sum_vec.push_back(arr1[i] + arr2[j]);
    //     }
    // }

    // std::sort(sum_vec.begin(), sum_vec.end(), std::less<int>());

    auto cmp = [&arr1, &arr2](std::pair<int, int> a, std::pair<int, int> b)
    {
        return arr1[a.first] + arr2[a.second] > arr2[b.first] + arr2[b.second];
    };
    std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, decltype(cmp)> prioq(cmp);

    std::vector<int> sum_vec;
    for (int i = 0; i < std::min(k, num1); i++)
    {
        prioq.emplace(i, 0);
    }

    int s = k;
    while (s-- && !prioq.empty())
    {
        auto idx_pair = prioq.top();
        int smv = arr1[idx_pair.first] + arr2[idx_pair.second];
        sum_vec.push_back(smv);
        prioq.pop();
        if (idx_pair.second + 1 < num2)
            prioq.emplace(idx_pair.first, idx_pair.second + 1);
    }

    int sum_v = 0;
    for (int i = 0; i < k; i++)
    {
        sum_v += sum_vec[i];
    }

    std::cout << sum_v << std::endl;

    return 0;
}